package com.lian.springboot.mapper;

import com.lian.springboot.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserMapper {
    @Select("select * from user")
    List<User> findAll();//查询全部内容


    @Insert("insert into user(username,password,nickname,email,phone,address) VALUES (#{username},"+"" +
            "#{password},#{nickname},#{email},#{phone},#{address})")
    Integer insert(User user);//插入
    Integer update(User user);//更新

    Integer deleteByID(@Param("id")Integer id);
}
